/* global $ */
/* this is an example for validation and change events */
$.fn.inputExample = function () {
	'use strict';
	var element = $(this),
		footer = element.find('tfoot tr'),
		dataRows = element.find('tbody tr');
		
	element.find('td').on('validate', function (evt, value) {
		var cell = $(this),
			column = cell.index();
		if (column === 4 || column === 5 || column === 6) {
			return !isNaN(parseFloat(value)) && isFinite(value);
			
		}else if (column === 3 || column === 7) {
			return !!value && value.trim().length > 0;
		
		} else {
			return false;
		}
	});
	return this;
};

